﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AppfabricAdministrator.Entities.Interface;

namespace AppfabricAdministrator.Commands.Host
{
    public class GetCacheHostConfig : ICommand
    {
        private String _commandName = "Get-CacheHostConfig";
        public Boolean IsSave = false;
        public string CommandName
        {
            get
            {
                return _commandName;
            }
            set
            {
                _commandName = value;
            }
        }

        private Dictionary<String, Object> _parameters = new Dictionary<String, Object>(){
            {"HostName",null},
            {"CachePort",null}
        };

        public Dictionary<string, object> Parameters
        {
            get
            {
                return _parameters;
            }
            set
            {
                _parameters = value;
            }
        }

        private string _successMessage = "Displaying cache host configuration.";
        public string SuccessMessage
        {
            get
            {
                if (IsSave)
                {
                    return String.Format("Updated configuration for host {0}.",_parameters["HostName"].ToString());
                }
                else
                {
                    return _successMessage;
                }
            }
        }
    }
}
